package com.ldgame.entities;

import com.ldgame.ai.AI;

public class Soldier extends Entity {
	private AI ai;
	private boolean shooting = false;
	
	public Soldier(Team team) {
		super(team);
		setSpeed(40.0f);
	}
	
	public void setAI(AI ai) {
		this.ai = ai;
	}

	@Override
	public void sync(City [] cities) {
		super.sync(cities);
		if (isEnabled()) {
			ai.sync();
			ai.processMovement();
			ai.shoot();
		}
	}

	public boolean isShooting() {
		return shooting;
	}

	public void setShooting(boolean shooting) {
		this.shooting = shooting;
	}
}
